-
Notifications
You must be signed in to change notification settings - Fork 0
39 create a navbar #83
base: dev
Are you sure you want to change the base?
Conversation
|
try to use tailwind |
|
Nice work on the navbar! The skip link, the labelled One thing about the styling: the project uses Tailwind for components, and the navbar uses CSS Modules ( Tailwind in short: instead of a CSS file, you put small classes on the element, one per CSS property. Our tokens from What to change:
Some classes that may be useful:
I'm happy to help with this! We can go through it together, or I can convert one part first as an example. Just let me know. 😊 |
|
Hei! Husk å ha closes #39 så vi ikke må lukek manuelt. Build fungerer ikke atm, antar det har noe med at typescript versjonen er endret til et lavere tall. Fikk Claude til å finne ut hvorfor: Én commit er årsaken. d310cc7 fra Xenia (20.10, «test: add vitest enviornment and create Navbar.test.tsx») endret package.json fra ~6.0.2 til ^5.7.3. package-lock.json gikk samtidig fra 6.0.3 til 5.7.3. Du har to "<main.>" inni hverandre tror jeg. kanskje dobbeltsjekke det i app. Claude sier: App pakker rutene i , og hver plassholderside har sin egen "<main.>". (skrev med . for hvis ikke formatterte det teksten)Gjerne gjør dark mode knappen slik at den husker etter ny innlastning med localstorage. Starter nå alltid som false. Dette catches ikke av testene, så du burde nok utvide din eksisterende test Also, i teksten til PR står det at det skal være en egen mobil overlay meny, kanskje dobbeltsjekke pr tekst? Ikke så viktig. |
Pull Request: Implement responsive, accessible Navbar with unit tests (#39)
Summary
This PR implements a fully responsive, accessible, and theme-aware
<Navbar>component alongside an automated unit test suite using Vitest and React Testing Library.Changes Introduced
Component Implementation
<Navbar>with clean desktop navigation and an accessible mobile overlay menu.Gymnastslink viaisLoggedIn).aria-checkedattributes.<SkipLink>) that becomes visible on keyboard focus (Tab) for WCAG 2.4.1 compliance.Testing & Quality Assurance
vite.config.tswith ajsdomtest environment and set upsrc/tests/setupTests.tsto extend matchers via@testing-library/jest-dom.src/tests/Navbar.test.tsx):aria-checkedstate changes on theme switch interaction.setIsLoggedIncallback when triggering the login button.Accessibility (A11y)
<header>,<nav>,<main>) and explicit ARIA roles (link,button,switch).How to Test
git checkout 39-create-a-navbarnpm installnpm run test:runnpm run dev